import Taro, { Component } from '@tarojs/taro'
import { View, Button, Text, Image } from '@tarojs/components'
import { AtModal } from 'taro-ui'
import './loginModal.less'

class LoginModal extends Component {

  render(){
    return (
      <AtModal
      isOpened={this.props.isOpened}
      content={(
        <View className="go-login-modal">
          <Text style="font-weight:bold;font-size:18px;">{this.props.info}</Text>
          <Text style="margin-top:20px;color:#6190E8;font-size:14px;" onClick={() => {
            this.props.parent.setState({
              isOpened:false
            }, () => {
              Taro.redirectTo({
                url:'/pages/mine/register?status=1'
              })
            })
          }}>请先登录</Text>
        </View>
      )}
    />
    )
  }
}
export default LoginModal
